﻿namespace BW.IDAL
{
    public interface IBaseDAL<T>
    {
        Task<int> AddAsync(T t);
        Task<int> AddRangeAsync(List<T> list);

        Task<int> UpDateAsync(T t);
        Task<int> UpDateRangeAsync(List<T> list);

        Task<int> DeleteAsync(T t);
        Task<int> DeleteRangeAsync(List<T> list);
        /// <summary>
        /// 延迟执行
        /// 解决查询问题
        /// </summary>
        /// <returns>返回IQueryable<T></returns>
        IQueryable<T> GetAllAsync();
    }
}
